Skip to main content
POST
/
v3
/
agents
Create Agent Endpoint
curl --request POST \
  --url https://agent-prod.studio.lyzr.ai/v3/agents/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Customer Support Agent",
  "description": "Handles level 1 customer inquiries.",
  "agent_role": "<string>",
  "agent_instructions": "<string>",
  "agent_goal": "<string>",
  "agent_context": "<string>",
  "agent_output": "<string>",
  "examples": "<string>",
  "features": [
    "<string>"
  ],
  "tools": [
    "<string>"
  ],
  "tool_usage_description": "<string>",
  "llm_credential_id": "<string>",
  "response_format": {},
  "provider_id": "openai",
  "model": "gpt-4o",
  "top_p": 1,
  "temperature": 0.7,
  "managed_agents": [
    {
      "id": "<string>",
      "name": "<string>",
      "usage_description": "<string>"
    }
  ],
  "tool_configs": [
    {
      "tool_name": "<string>",
      "tool_source": "<string>",
      "action_names": [
        "<string>"
      ],
      "persist_auth": false,
      "server_id": "<string>",
      "provider_uuid": "<string>",
      "credential_id": "<string>"
    }
  ],
  "store_messages": true,
  "file_output": false,
  "a2a_tools": [
    {
      "base_url": "<string>"
    }
  ],
  "voice_config": {},
  "additional_model_params": {},
  "image_output_config": {
    "model": "<string>",
    "credential_id": "<string>"
  },
  "max_iterations": 25,
  "git_agent": {
    "enabled": false,
    "repo_name": "<string>",
    "branch": "main",
    "environments": [
      "<string>"
    ],
    "branches": [
      "<string>"
    ],
    "reviewers": [
      "<string>"
    ],
    "pat": "<string>",
    "org": "<string>",
    "provider": "github",
    "repo_url": "<string>",
    "repo_full_name": "<string>"
  },
  "proxy_config": {
    "enabled": false,
    "endpoint_url": "<string>",
    "api_key": "<string>",
    "system_prompt_captured": false,
    "parameter_policies": {},
    "passthrough_tools": true,
    "passthrough_tool_choice": true,
    "passthrough_response_format": true
  }
}
'
{
  "agent_id": "654b9d3d451c1aeefd800xyz"
}

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
Example:

"Customer Support Agent"

description
string
Example:

"Handles level 1 customer inquiries."

agent_role
string
agent_instructions
string
agent_goal
string
agent_context
string
agent_output
string
examples
string
features
string[]
tools
string[]
tool_usage_description
string
llm_credential_id
string
response_format
object
provider_id
string
Example:

"openai"

model
string
Example:

"gpt-4o"

top_p
number<float>
Example:

1

temperature
number<float>
Example:

0.7

managed_agents
object[]
tool_configs
object[]
store_messages
boolean
default:true
file_output
boolean
default:false
a2a_tools
object[]
voice_config
object
additional_model_params
object
image_output_config
object
max_iterations
integer
default:25
git_agent
object
proxy_config
object

Response

Agent created successfully.

agent_id
string

The unique identifier of the created agent.

Example:

"654b9d3d451c1aeefd800xyz"